import request from '@/utils/request'

// 查询粗粒度ip段列表
export function listCoarsesegment(query,rou) {
  return request({
    url: '/ipmanagement/coarsesegment/list/'+rou,
    method: 'get',
    params: query
  })
}

// 查询粗粒度ip段详细
export function getCoarsesegment(id) {
  return request({
    url: '/ipmanagement/coarsesegment/' + id,
    method: 'get'
  })
}

// 新增粗粒度ip段
export function addCoarsesegment(data,rou) {
  return request({
    url: '/ipmanagement/coarsesegment/'+rou,
    method: 'post',
    data: data
  })
}

// 修改粗粒度ip段
export function updateCoarsesegment(data,rou) {
  return request({
    url: '/ipmanagement/coarsesegment/'+rou,
    method: 'put',
    data: data
  })
}

// 删除粗粒度ip段
export function delCoarsesegment(id) {
  return request({
    url: '/ipmanagement/coarsesegment/' + id,
    method: 'delete'
  })
}
